﻿package org.dm.3d.object.shape 
{
	import flash.display.BitmapData;
	import flash.display.Shape;
	import flash.geom.Vector3D;
	
	/**
	 * ...
	 * @author Scott
	 */
	public class RoundSpot extends ObjectBase
	{
		public var _radius:Number;
		public var _mass:Number;
		public var _color:uint;
		//public var img:Shape;
		
		public function RoundSpot(pradius:Number = 1, pcolor:uint = 0x0, palpha:Number = 1, pmass:Number = 2 ) 
		{
			_radius = pradius;
			_mass = pmass;
			_color = pcolor;
			alpha = palpha > 1?1:palpha < 0?0:palpha;
			draw();
		}		
		public function set radius(value:Number):void 
		{
			_radius = value;
			draw();
		}
		public override function draw():void
		{
			//if (!stage) stage.invalidate();
			graphics.clear();
			//graphics.beginGradientFill("radial",[0x555555,0x0],[1,1],[0, 10]);
			graphics.beginFill(_color, 1);
			graphics.drawCircle(0, 0, _radius);
			graphics.endFill();
		}
	}
	
}